package com.baobaotao.reflect;

import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;

public class mian {

	public static void main(String[] args) {
		PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
		Resource resource = resolver.getResource("classpath:bean.xml");
		XmlBeanFactory beanFactory = new XmlBeanFactory(resource);
		Car car = beanFactory.getBean("car",Car.class);
		System.out.println(car);
		
	}
}
